package com.guigu.servicebusiness.config;

import com.guigu.servicebusiness.service.ITbAdService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Init implements InitializingBean {

    @Autowired
    private ITbAdService adService;
    public void afterPropertiesSet() throws Exception {
        System.out.println("‐‐‐缓存预热‐‐‐");
        adService.saveAllAdToRedis();
    }
}
